home *** CD-ROM | disk | FTP | other *** search
- public class EffectDiscFortitude extends Codex {
- private int _creatorGuid;
- private int padGuid;
-
- public void EndEffect() {
- CodexThing pad = new CodexThing(this.padGuid);
- pad.Remove();
- CodexActor _Creator = new CodexActor(this._creatorGuid);
- ((CodexThing)_Creator).EndShell();
- }
-
- public void restore(int flags) {
- this.padGuid = CodexSequence.RestoreInt();
- this._creatorGuid = CodexSequence.RestoreInt();
- }
-
- public void effectstarted(int actorGuid, int effectGuid, int creatorGuid, int duration) {
- this._creatorGuid = actorGuid;
- CodexActor _Creator = new CodexActor(this._creatorGuid);
- ((CodexThing)_Creator).SpawnThing("invshockwave");
- ((CodexThing)_Creator).SetShell("redCloudShell_b", 20480, 0.0F, 0.9F, 1.0F, 1.0F);
- this.padGuid = ((CodexThing)_Creator).SpawnThing("sawToothBlue");
- float[] offset = new float[3];
- offset[0] = offset[1] = offset[2] = 0.0F;
- ((CodexThing)_Creator).AttachThing(this.padGuid, -1, offset, 1);
- ((Codex)this).CaptureThing(this._creatorGuid);
- }
-
- public void killed(int guid, int causeID, int captureID) {
- this.EndEffect();
- }
-
- public void soaked(int guid, int causeGUID, float damageAmount, int damageType, float soakAmount, int captureID) {
- CodexActor _Creator = new CodexActor(this._creatorGuid);
- if (soakAmount > 0.0F && soakAmount >= damageAmount) {
- ((CodexThing)_Creator).SetShell("white", 20480, 0.0F, 1.0F, 1.0F, 1.0F);
- }
-
- }
-
- public void save(int flags) {
- CodexSequence.SaveInt(this.padGuid);
- CodexSequence.SaveInt(this._creatorGuid);
- }
-
- public void effectended(int actorGuid, int effectGuid, int creatorGuid, int reason) {
- this.EndEffect();
- }
- }
-